# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models
from django.contrib.auth.models import AbstractUser
from django.utils.translation import ugettext as _

# Create your models here.


class Member(AbstractUser):
    """会员表"""

    GENDER_CHOICES = (
        (0, '未设置'),
        (1, '男'),
        (2, '女')
    )

    real_name = models.CharField(
        max_length=50, blank=True, null=True, verbose_name='真实姓名')
    gender = models.SmallIntegerField(
        choices=GENDER_CHOICES, default=0, verbose_name='性别')
    phone = models.CharField(max_length=20, blank=True,
                             unique=True, null=True, verbose_name='手机号码')
    qq = models.CharField(max_length=20, blank=True,
                          unique=True, null=True, verbose_name='qq')
    create = models.DateTimeField(
        auto_now_add=True, verbose_name='创建时间')
    modify = models.DateTimeField(
        auto_now=True, verbose_name='修改时间')

    class Meta(AbstractUser.Meta):
        db_table = 'member'
